home *** CD-ROM | disk | FTP | other *** search
/ Trading on the Edge / Trading On The Edge - CD-ROM Toolkit (Wayzata Technology)(2031)(1994).bin / pc / mac_file / vendor_d / neuralwa / nw2v50 / hamming.nnc < prev    next >
Text File  |  1993-08-23  |  2KB  |  71 lines

  1. csv3.1        !file format is Control Strategy Version 3.1
  2. !Sept 88  (hamming.nnc)  Hamming Network
  3. !************************************************************************
  4. !*                                    *
  5. !*    Hamming Network Control Strategy                *
  6. !*                                    *
  7. !*    This control strategy assumes the following layers,        *
  8. !*    geometrically positioned from bottom to top of the screen:    *
  9. !*                                    *
  10. !*    layer 0:    Input Buffer                    *
  11. !*    layer 1:    Category Layer ( same size as output buffer )    *
  12. !*    layer 2:    Output Buffer                    *
  13. !*                                    *
  14. !************************************************************************
  15. !
  16. !MASK     label    op-code    operands    comment
  17. L_saR_sa    trace    aux3        ! set trace option to aux3
  18. Li_aRi_a    cset    recall,1    ! Initialize recall count
  19. !
  20. ! Get input
  21. !
  22. Li_aRi_a    lset    in        ! input layer
  23. L___Ri_a    io    read        ! get input data (recall)
  24. Li_aR___    io    lrnin        ! get input data (learn)
  25. !
  26. ! Process Input Layer
  27. !
  28. L___Ri_a     math    sum|rnoise|tran|output
  29. Li_aR___    math    sum|lnoise|tran|output|fire
  30. !
  31. ! Process Category layer ( recall )
  32. !
  33. L___Risa     lset    in,1            ! Category layer
  34. L___Ri_a     math    sum|tran|output
  35. L___Risa    fcmp    outputf,0        ! look at output function
  36. L___Risa    bne    @out            ! standard competitive layer
  37. !
  38. ! Competition through lateral inhibition; recall until convergence
  39. !
  40. L___R_sa @latin    cset    wrk1,0            ! reset work 1 counter
  41. L___R_sa    cadd    recall,1        ! increment recall counter
  42. L___R_sa    math    set|tran|e=w|cterr
  43. L___R_sa    math    output
  44. L___R_sa    ccmp    wrk1,1            ! see if only one active
  45. L___R_sa    ble    @out            ! branch to output
  46. L___R_sa    fcmp    lflag,36         ! end of recall schedule?
  47. L___R_sa    banz    @out            ! if yes, do output
  48. L___R_sa    io    wrstep            ! write interim data
  49. L___R_s_    eos
  50. L___R_sa    brct    @latin
  51.  
  52. L___R_sa @out    cadd    recall,1        ! increment recall counter
  53. L___R_sa      lset    out
  54. L___R_sa    io    rcltst
  55. L___R_sa    math    sum|ce=e|tran|output|e-=w|swap
  56. L___R_sa    io    write
  57. !
  58. ! Learning phase
  59. !
  60. L_saR___     lset    in,1            ! Category layer
  61. L_saR___    math    e=0|fire        ! zero out errors
  62. L_saR___    lset    out
  63. L_saR___    io    lrnout            ! Get desired output
  64. L_saR___    math    backp|fire        ! Back-propagate output
  65. L_saR___    lset    out,-1            ! Category layer
  66. L_saR___    math    w=e|output|learn|fire    ! learn
  67. L_saR___    lset    out
  68. L_saR___    io    lrnrslt            ! For form's sake
  69. !
  70. !LisaRisa    trace    0        ! turn off any trace function
  71.